def fun01():
    # E 外部嵌套作用域
    a = 1

    def fun02():
        # fun02 局部变量
        b = 2
        #   可以访问外部嵌套变量a
        # print('fun02:', a)
        # 声明外部嵌套变量2
        nonlocal a
        a = 222
        print('fun02:', a)

    fun02()
    print('fun01:', a)


fun01()
